<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <body>
        <h3>Invoice List</h3>
        <a href="controller?action=invoice_new">Insert New Invoice</a>
        <table border="1">
            <tr>
                <td>Tanggal</td>
                <td>Customer</td>
            </tr>
            <c:forEach items="${invoices}" var="invoice">
                <tr>
                    <td><fmt:formatDate value="${invoice.tgl}" pattern="dd MMM yyyy"/></td>
                    <td>${invoice.customer.nama}</td>
                </tr>
            </c:forEach>
        </table>
    </body>
</html>